export const items1 = [
  {
    fieldName: "客户名称",
    fieldId: "customerName",
  },

  {
    fieldName: "客户地址",
    fieldId: "customerAddress",
  },
  {
    fieldName: "个体工商户",
    fieldId: "isSelfEmployed",
  },
  {
    fieldName: "所属行政区",
    fieldId: "regionId",
  },
  {
    fieldName: "备注",
    fieldId: "remark",
  },
  {
    fieldName: "行业分类",
    fieldId: "professionId",
  },
  {
    fieldName: "垃圾费户数",
    fieldId: "garbageNum",
  }
];
export const items2 = [
  {
    fieldName: "个体工商户",
    fieldId: "isSelfEmployed",
  },
  {
    fieldName: "所属行政区",
    fieldId: "regionId",
  },
  {
    fieldName: "备注",
    fieldId: "remark",
  },
  {
    fieldName: "行业分类",
    fieldId: "professionId",
  },
  {
    fieldName: "垃圾费户数",
    fieldId: "garbageNum",
  }
];
export const items3 = [
  {
    fieldName: "计费标志",
    fieldId: "isCharge",
  },
  {
    fieldName: "表卡类型",
    fieldId: "cardType",
  },
  {
    fieldName: "总表编号",
    fieldId: "masterCardNo",
  },
  {
    fieldName: "安装地址",
    fieldId: "installAddress",
  },
  {
    fieldName: "水表编码",
    fieldId: "meterNo",
  },
  {
    fieldName: "水表型号",
    fieldId: "meterModelId",
  },
  {
    fieldName: "IMEI",
    fieldId: "meterDeviceCode",
  },
  {
    fieldName: "水表读数",
    fieldId: "prevReadDegree",
  },
  {
    fieldName: "抄表周期",
    fieldId: "readCycleId",
  },
  {
    fieldName: "抄表计件单价",
    fieldId: "pieceworkPriceId",
  },
  {
    fieldName: "备注",
    fieldId: "remark",
  }
];
export const items4 = [
  {
    fieldName: "计费标志",
    fieldId: "isCharge",
  },
  {
    fieldName: "表卡类型",
    fieldId: "cardType",
  },
  {
    fieldName: "总表编号",
    fieldId: "masterCardNo",
  },
  {
    fieldName: "水表型号",
    fieldId: "meterModelId",
  },
  {
    fieldName: "抄表周期",
    fieldId: "readCycleId",
  },
  {
    fieldName: "抄表计件单价",
    fieldId: "pieceworkPriceId",
  },
  {
    fieldName: "备注",
    fieldId: "remark",
  }
];
// 、分表、总表；
export const cardTypeOptions = [
  {
    label: "户表",
    value: 0,
  },
  {
    label: "分表",
    value: 1,
  },
  {
    label: "总表",
    value: 2,
  }
];
// 行业分类数据处理
export function getGroupChild(data) {
  if (data.length != 0) {
    data.forEach(item => {
      item.children = item.childrenList ? item.childrenList : []
      item.label = item.professionName
      item.value = item.professionId
      if (item.children.length == 0) {
        delete item.children
      } else {
        getGroupChild(item.children)
      }
    })
  }
  return data
}